//
//  SEGRequestManager.h
//  ExcellentHome
//
//  Created by 梁昆 on 16/8/30.
//  Copyright © 2016年 陈区. All rights reserved.
//
#import "SEGCompleteInfoModel.h"
#import "SEGTelCaptchasByRegisterModel.h"
#import "SEGChangeCommunityModel.h"
#import "SEGSearchCommunityModel.h"
#import <Foundation/Foundation.h>
#import "SEGCityListModel.h"

@interface SEGRequestManager : NSObject
//小区数据源
@property (nonatomic, strong) NSArray<SEGSearchCommunityModel*>* dataSourceCommunity;
//更换小区数据源
@property (nonatomic, strong) NSArray<SEGChangeCommunityModel*>* dataSourceCommunityList;

@property (nonatomic, strong) SEGTelCaptchasByRegisterModel* seg_segtelcaptchasbyregistermodel;
//完善资料获取积分数据源
@property (nonatomic, strong) SEGCompleteInfoModel* seg_segcompleteinfomodel;

/// 获取密码规则配置
/// @param finished 获取密码规则配置
- (void)requestPasswordConfigInfo:(SEGNetworkReponse)finished;

/// 注销界面      获取短信验证码
/// @param tel 手机号码
/// @param imgCode  图片验证码值
/// @param randomToken 随机数
/// @param finished 回调
- (void)logout_requestGetCaptchasByTel:(NSString *)tel
                               imgCode:(NSString *)imgCode
                           randomToken:(NSString *)randomToken
                              Finished:(SEGNetworkReponse)finished;

///  忘记密码获取验证码    网络请求
///
///  @param tel 手机号码
///  @param imgCode 图片验证码值
///  @param randomToken 随机数
- (void)requestGetCaptchasByTel:(NSString*)tel
                        imgCode:(NSString*)imgCode
                    randomToken:(NSString*)randomToken
                       Finished:(SEGNetworkReponse)finished;

///  注册时获取验证码  网络请求
///
///  @param tel      手机号码
///  @param imgCode      图片验证码值
///  @param randomToken  随机数
- (void)requestVerCodeForRegisterByRegister:(NSString*)tel
                                    imgCode:(NSString*)imgCode
                                randomToken:(NSString*)randomToken
                                   Finished:(SEGNetworkReponse)finished;

/// 注册时 校验密码是否有效
/// @param password password
/// @param finished finished
- (void)requestPasswordIsVaild:(NSString *)password Finished:(SEGNetworkReponse)finished;

///  根据手机号码，验证码，校验是否有效
///
///  @param tel      手机号码
///  @param smsCode  验证码
///  @param password 密码
- (void)requestValidateCaptchasByTel:(NSString*)tel
                             smsCode:(NSString*)smsCode
                            password:(NSString*)password
                            Finished:(SEGNetworkReponse)finished;

///根据手机号、小区、密码注册小区
///
///  @param tel         手机号码
///  @param smsCode     手机验证码
///  @param password    密码
///  @param communityId 注册小区
///  @param randomToken 随机码
- (void)requestUserAppRegisterByTel:(NSString*)tel
                            smsCode:(NSString*)smsCode
                           password:(NSString*)password
                        communityId:(NSString*)communityId
                        randomToken:(NSString*)randomToken
                           Finished:(SEGNetworkReponse)finished;

///  查询小区
///
///  @param communityName 小区名称
- (void)requestFindCommunityByName:(NSString*)communityName
                          cityCode:(NSString *)cityCode
                          Finished:(SEGNetworkReponse)finished;

///  忘记密码,找回密码
///
///  @param tel      手机号码
///  @param randomToken  随机码
///  @param smsCode  手机验证码
///  @param password 新密码
- (void)requestUserAppRestPwdByTel:(NSString*)tel
                           smsCode:(NSString*)smsCode
                       randomToken:(NSString*)randomToken
                          password:(NSString*)password
                          Finished:(SEGNetworkReponse)finished;

/**
 app修改密码
 
 @param tel 手机号码
 @param newPwd 新密码
 @param oldPwd 旧密码
 @param imgCode 图形验证码
 @param randomToken 图形验证码标识
 @param finished 回调
 */
- (void)requestUserInfoUpdatePwdByTel:(NSString*)tel newPwd:(NSString*)newPwd oldPwd:(NSString*)oldPwd imgCode:(NSString *)imgCode randomToken:(NSString *)randomToken finished:(SEGNetworkReponse)finished;

///  切换小区入口网络请求
///
- (void)requestFindMyCommunityFinished:(SEGNetworkReponse)finished;

///  点击切换小区
///
///  @param communityId 小区Id
- (void)requestswitchCommunityBycommunityId:(NSString*)communityId
                                   Finished:(SEGNetworkReponse)finished;

///  删除小区
///
///  @param communityId 小区Id
- (void)requestDeleteCommunityBycommunityId:(NSString*)communityId
                                   Finished:(SEGNetworkReponse)finished;

///  添加注册小区
///
///  @param communityId 小区Id
- (void)requestSaveRegisterCommunityBycommunityId:(NSString*)communityId
                                         Finished:(SEGNetworkReponse)finished;

/**
 *  获取语音验证码
 *
 *  @param tel      手机号
 *  @param operType 类型 注册：register 忘记密码：forgetPwd
 *  @param finished 完成回调
 */
- (void)requestGetSoundCodeByTel:(NSString*)tel
                         imgCode:(NSString*)imgCode
                     randomToken:(NSString*)randomToken
                            Type:(NSString*)operType
                        Finished:(SEGNetworkReponse)finished;


/**
 * 变更手机号 -- 用于更换新手机号页面信息填写完成功能
 * @author helen
 * @param oldTel  旧的手机号
 * @param newTel  新的手机号
 * @param smsCode 手机号验证码
 * @param finished 完成回调
 */
-(void)requestChangeTelByOldTel:(NSString *)oldTel
                         newTel:(NSString *)newTel
                        smsCode:(NSString *)smsCode
                       Finished:(SEGNetworkReponse)finished;

///获取图片验证码
-(void)requestRefreshCheckCodeFinished:(SEGNetworkReponse)finished;

/// 获取安全改造的验证码
- (void)requestSecurityRefreshCheckCodeWithFinished:(SEGNetworkReponse)finished;

//获取积分
-(void)requestgetCompleteInformationFinished:(SEGNetworkReponse)finished;

/**
 * 获取同城热门社区 4.3.7新增
 * @author Wendy
 * @param cityCode  城市编码
 * @param finished  回调
 */
-(void)requestQueryCommunityListWithCityCode:(NSString *)cityCode
                                    finished:(SEGNetworkReponse)finished;
//热门小区数据源
@property (nonatomic, strong) NSArray<SEGChangeCommunityModel*>* hotCommunityList;



/**
 * 获取城市列表接口 4.3.7新增
 * @author Wendy
 */
-(void)requestQueryCityListWithCity:(SEGNetworkReponse)finished;
//城市列表数据源
@property (nonatomic, strong) NSArray<SEGCityListModel *>* cityList;

/**
 * 获取登录手机验证码
 * @author Wendy
 * @param tel  手机号
 * @param organId  组织机构ID
 * @param imgCode  图片验证码
 * @param randomToken  唯一标志
 * @param accountCode  账户编码
 * @param businessCode  账户编码
 * @param finished 完成回调
 */
-(void)requestGetLoginSmsByTel:(NSString *)tel
                       organId:(NSString *)organId
                       imgCode:(NSString *)imgCode
                   randomToken:(NSString *)randomToken
                   accountCode:(NSString *)accountCode
                  businessCode:(NSString *)businessCode
                      finished:(SEGNetworkReponse)finished;

/// 注销账号
/// @param tel 手机号
/// @param smsCode 短信验证码
/// @param businessCode 短信业务编码
/// @param finished 回调
- (void)requestLogoutAccountWithTel:(NSString *)tel
                            smsCode:(NSString *)smsCode
                       businessCode:(NSString *)businessCode
                           finished:(SEGNetworkReponse)finished;

@end
